/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// Dates when the business is closed or open with a different time window.
    /// </summary>
    [DataContract(Name = "ExceptionDates")]
    public partial class ExceptionDates : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ExceptionDates" /> class.
        /// </summary>
        /// <param name="exceptionDate">Date when the business is closed, in &lt;a href&#x3D;&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#39;&gt;ISO 8601&lt;/a&gt; date format..</param>
        /// <param name="isOpen">Boolean indicating if the business is closed or open on that date..</param>
        /// <param name="openIntervals">Time window during the day when the business is open..</param>
        public ExceptionDates(string exceptionDate = default(string), bool isOpen = default(bool), List<OpenInterval> openIntervals = default(List<OpenInterval>))
        {
            this.ExceptionDate = exceptionDate;
            this.IsOpen = isOpen;
            this.OpenIntervals = openIntervals;
        }

        /// <summary>
        /// Date when the business is closed, in &lt;a href&#x3D;&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#39;&gt;ISO 8601&lt;/a&gt; date format.
        /// </summary>
        /// <value>Date when the business is closed, in &lt;a href&#x3D;&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#39;&gt;ISO 8601&lt;/a&gt; date format.</value>
        [DataMember(Name = "ExceptionDate", EmitDefaultValue = false)]
        public string ExceptionDate { get; set; }

        /// <summary>
        /// Boolean indicating if the business is closed or open on that date.
        /// </summary>
        /// <value>Boolean indicating if the business is closed or open on that date.</value>
        [DataMember(Name = "IsOpen", EmitDefaultValue = true)]
        public bool IsOpen { get; set; }

        /// <summary>
        /// Time window during the day when the business is open.
        /// </summary>
        /// <value>Time window during the day when the business is open.</value>
        [DataMember(Name = "OpenIntervals", EmitDefaultValue = false)]
        public List<OpenInterval> OpenIntervals { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ExceptionDates {\n");
            sb.Append("  ExceptionDate: ").Append(ExceptionDate).Append("\n");
            sb.Append("  IsOpen: ").Append(IsOpen).Append("\n");
            sb.Append("  OpenIntervals: ").Append(OpenIntervals).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
